/**
 * 
 */
package com.wubo.sec.log;

import com.wubo.sec.model.ActionLog;
import com.wubo.sec.service.IActionLogService;

/**
 * @author wubo
 * @CreateDate 2010-7-29
 * @version 1.0.01
 */

public class ActionLogAppender implements ILogAppender {

	private IActionLogService actionLogService;
	
	public IActionLogService getActionLogService() {
		return actionLogService;
	}
	
	public void setActionLogService(IActionLogService actionLogService) {
		this.actionLogService = actionLogService;
	}
	/* (non-Javadoc)
	 * @see com.wubo.sf.log.ILogAppender#append(com.wubo.sf.log.ILog)
	 */
	public void append(ILog log) {
		actionLogService.save((ActionLog) log);
	}

	/* (non-Javadoc)
	 * @see com.wubo.sf.log.ILogAppender#supports(java.lang.Class)
	 */
	public boolean supports(Class<?> logClass) {
		return ActionLog.class.isAssignableFrom(logClass);
	}

}
